<template>
  <div class="search-header">
    <div class="back" @click="backHandler">
      <i class="iconfont">&#xe628;</i>
    </div>
    <div class="input-field">
      <input type="text" placeholder="购物商城" >
      <i class="iconfont">&#xe621;</i>
    </div>
    <div class="msg">
      <i class="iconfont">&#xe622;</i>
    </div>
  </div>
</template>

<script>
export default {
  name: 'SearchHeader',
  created () {
    console.log(this)
  },
  methods: {
    backHandler () {
      this.$router.back()
    }
  }
}
</script>

<style lang="scss" scoped>
  .search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    background: rgb(255, 53, 53);
    .back {
      width: 60px;
      text-align: center;
    }
    .msg {
      width: 60px;
      text-align: center;
    }
    .input-field{
      position: relative;
      input{
        width: 224px;
        height: 25px;
        padding-left: 25px;
        border-radius: 10px;
        border: none;
      }
      .iconfont{
        font-size: 14px;
        display: block;
        position: absolute;
        left: 7px;
        top: 7px;
      }
    }
  }
</style>
